<link rel="stylesheet" href="/assets/home/css/coupon_list.css" />

{if condition="$list"}
    <div class="coupon_list">
        {foreach $list as $item}
            <div class="coupon_item">
                <div class="item_content">
                    <a href="{:url('home/coupon/info', ['cid' => $item['id']])}">
                        <div class="left">
                            {$item.rate*100}<span>折</span>
                        </div>
                        <div class="right">
                            <div>{$item.title}</div>
                            <div>活动开始时间：{$item.createtime_text}</div>
                            <div>活动结束时间：{$item.endtime_text}</div>
                            <div>领取数量：{$item.total} 张 每人限领1张</div>
                        </div>
                    </a>
                </div>
                <div class="item_btn">
                    {if condition="$item.receive"}
                        <a href="{:url('home/coupon/receive', ['cid' => $item['id']])}" class="mui-btn mui-btn-warning">立即领取</a>
                    {else /}
                        <a class="mui-btn" disabled>已领取</a>
                    {/if}
                </div>
            </div>
        {/foreach}
    </div>
{/if}
